package ch.ethz.eai.test;

import ch.ethz.eai.data.*;
import ch.ethz.eai.webservice.*;

import junit.framework.TestCase;

public class OurWebServiceTester extends TestCase 
{
	
	public void testSetWeatherStatus ()
	{
		System.out.println("--------------");
		System.out.println("SetWeatherTest");
		System.out.println("--------------");
		OurWebService ows = new OurWebService();
		ResponseMessage rm;
		rm = ows.setWeatherStatusByAddress(WeatherStatus.STAT_CLOUDS + "", "Raemistrasse 101,8006,Zurich,Switzerland");
		System.out.println(rm.toString());
		rm = ows.setWeatherStatusByAddress(WeatherStatus.STAT_RAIN + "", "Bahnhofstrasse,,Zurich,Switzerland");
		System.out.println(rm.toString());
		rm = ows.setWeatherStatusByCoordinates(WeatherStatus.STAT_CLOUDS + "", 47.372635, 8.537243);
		System.out.println(rm.toString());
		System.out.println();
	}
	

	public void testGetProposals()
	{
		System.out.println("----------------");
		System.out.println("GetProposalsTest");
		System.out.println("----------------");
		OurWebService ows = new OurWebService();
		ResponseMessage rm;
		rm = ows.getProposalsByAddress("Raemistrasse 101,8006,Zurich,Switzerland");
		System.out.println(rm.toString());
		rm = ows.getProposalsByAddress("Bahnhof,,Zurich,Switzerland");
		System.out.println(rm.toString());
		rm = ows.getProposalsByAddress("Paradeplatz,,Zurich,Switzerland");
		System.out.println(rm.toString());
		rm = ows.getProposalsByCoordinates(47.372635, 8.537243);
		System.out.println(rm.toString());
		System.out.println();
	}
}
